package com.heima.search.listener;

import com.heima.search.service.IUserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class SyncArticlToEsListener {


    @Autowired
    private IUserSearchService userSearchService;

    @KafkaListener(topics = "sync_es_topic")
    public void getMessage(String message){
       userSearchService.syncES(message);
    }
}
